
//Eg3-23.cp
#include <iostream>
using namespace std;
class A{
    int a;
public:
    A(int i){
        a=i;
        cout<<"constructing A:" <<a<<endl;
    }
};
class B{
    int b;
public:
    B(int i){
        b=i;
        cout<<"constructing B:" <<b<<endl;
    }
};
class C{
    A a1,a2;
    B b1,b2;
public:
    C(int i1,int i2,int i3,int i4):b1(i1),a1(i2),b2(i3),a2(i4){}
};
void main(){
    C x(1,2,3,4);
}

